import requests from "./ajax";

// 获取课程
export const reqGetCourses = (params) => {
  return requests({
    url: `/wx/video/courses/videoCourses`,
    method: "get",
    params,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
  });
};

// 查询考场
export const reqGetRoomOptions = (params) => {
  return requests({
    url: `/wx/examination/room/query/areacode`,
    method: "get",
    params,
  });
};
// 上传图片
export const reqUploadImage = (data) => {
  return requests({
    url: `/file/upload`,
    method: "post",
    data,
    headers: { "Content-Type": "multipart/form-data" },
  });
};
// 添加课程
export const reqAddCourse = (data) => {
  return requests({
    url: `/wx/video/courses/addOrUpdate`,
    method: "post",
    data,
    headers: { "Content-Type": "application/json" },
  });
};
// 删除课程
export const reqRemoveCourse = (params) => {
  return requests({
    url: `/wx/video/courses/delete`,
    method: "get",
    params,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
  });
};
